﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FuLiaoSupplierReAudit_Search.aspx.cs" Inherits="syc.Sale.FuLiaoSupplierReAudit_Search" %>

<head runat="server">
    <title></title>
</head>
<body>
   <script type="text/javascript" language="javascript" src="/common.js"></script>

    <form id="form1" runat="server">
    <div id="wintop" class="wintop">辅料供方复评管理</div>
    <asp:Panel ID="Panel1" runat="server" CssClass="panel">
         <input type="button" value="录 入" class="button" onclick="parent.swin2_load('/Sale/FuLiaoSupplierReAudit.aspx', 720, 980,'yes')"/>
       <asp:Button ID="Button_Edit" runat="server" Text="查看/修改" CssClass="button" 
             UseSubmitBehavior="False" Enabled="False"/>   
        <asp:Button ID="Button_Delete" runat="server" Text="删 除" CssClass="button" Enabled="False"
            UseSubmitBehavior="False" onclick="Button_Delete_Click" OnClientClick="if(!confirm('确认删除该条记录吗?')) return false;"/>
        </asp:Panel>
    <asp:Panel ID="Panel2" runat="server" CssClass="panel" GroupingText="查 询">
        供货单位：<asp:DropDownList ID="GongHuo" runat="server" 
            DataSourceID="SqlDataSource2" DataTextField="名称" DataValueField="ID" 
            Width="120px">
        </asp:DropDownList>
        &nbsp;&nbsp;&nbsp; 供货产品：<asp:DropDownList ID="ChanPin" runat="server" 
            DataSourceID="SqlDataSource3" DataTextField="品名" DataValueField="ID" 
            Width="120px">
        </asp:DropDownList>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
            SelectCommand="SELECT 0 as [ID], '全部' as [名称] union SELECT [ID], [名称] FROM [辅料供货单位] where ID in (select  distinct 供货商ID from 辅料供方复评表)"></asp:SqlDataSource>
        <br />
        开始日期：<asp:TextBox ID="Date1" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date1').value, document.getElementById('Date1'));" />
        结束日期：<asp:TextBox ID="Date2" runat="server" CssClass="intxt1" Width="120px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date2').value, document.getElementById('Date2'));" />&nbsp;
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
            SelectCommand="SELECT 0 as [ID], '全部' as [品名] union SELECT [ID], [品名] FROM [材料]"></asp:SqlDataSource>
        
       
        &nbsp;
        <asp:Button ID="Button_Query" runat="server" Text="筛 选" CssClass="wsbutton" 
            UseSubmitBehavior="False" onclick="Button_Query_Click" />
        
    </asp:Panel>
       <asp:Panel ID="Panel3" runat="server" CssClass="panel2">
        <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
        <asp:Label ID="SelectedID" runat="server" Text="" Visible="false"></asp:Label>
        <asp:Label ID="SqlText" runat="server" Text="" Visible="false"></asp:Label>
    </asp:Panel>
    <div class="gridframe">
        <div class="gridview">
        
            <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#e5cfab">
	           <tr>
	           		<td class="grid-title">供方复评管理</td>
		        </tr>
		        <tr>
		           <td class="grid-back">
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
                           ></asp:SqlDataSource>
		                 <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" CssClass="grid" DataKeyNames="ID" 
                            DataSourceID="SqlDataSource1" 
                            GridLines="None" ondatabound="GridView1_DataBound" 
                            onpageindexchanged="GridView1_PageIndexChanged" AllowSorting="True" 
                            UseAccessibleHeader="False" 
                            onselectedindexchanged="GridView1_SelectedIndexChanged" >
                            <PagerSettings Visible="False" />
                            <RowStyle CssClass="grid-row-normal" />
                            <SelectedRowStyle   CssClass="grid-row-bright" />
                            <Columns>
                             <asp:TemplateField HeaderText="">
                                    <ItemTemplate>
                                        <asp:Button ID="Button1" runat="server" CommandName="Select" Text="选择" CssClass="hide"/>
                                        <img src="/Icons/online.gif" style="margin-top:2px;" alt="" />
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header"  Width="20px"/>
                                    
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="20px" />
                                </asp:TemplateField>                              
                                
                                 <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ItemStyle-HorizontalAlign="Center"
                                    ReadOnly="True" SortExpression="ID"  ItemStyle-CssClass="grid" Visible ="false"
                                    HeaderStyle-CssClass="grid-header">
<HeaderStyle CssClass="grid-header" Width="120px"></HeaderStyle>

<ItemStyle CssClass="grid" Width="120px"></ItemStyle>
                                </asp:BoundField>
                                
                                <asp:BoundField DataField="供货商" HeaderText="供货商"  ItemStyle-HorizontalAlign="Center"
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header">
<HeaderStyle CssClass="grid-header" Width="120px"></HeaderStyle>

<ItemStyle CssClass="grid" Width="120px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="产品" HeaderText="产品" SortExpression="产品ID" ItemStyle-HorizontalAlign="Center"
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header">
<HeaderStyle CssClass="grid-header" Width="120px"></HeaderStyle>

<ItemStyle CssClass="grid" Width="120px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="评价人" HeaderText="评价人" SortExpression="评价人" ItemStyle-HorizontalAlign="Center"
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header" >
<HeaderStyle CssClass="grid-header" Width="120px"></HeaderStyle>

<ItemStyle CssClass="grid" Width="120px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="评价日期" DataFormatString="{0:D}" HeaderText="评价日期" ItemStyle-HorizontalAlign="Center"
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header"
                                    SortExpression="评价日期" >
<HeaderStyle CssClass="grid-header" Width="120px"></HeaderStyle>

<ItemStyle CssClass="grid" Width="120px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="批准人" HeaderText="批准人" SortExpression="批准人"  ItemStyle-HorizontalAlign="Center"
                                    ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header" >
<HeaderStyle CssClass="grid-header" Width="120px"></HeaderStyle>

<ItemStyle CssClass="grid" Width="120px"></ItemStyle>
                                </asp:BoundField>
                            </Columns>
                        </asp:GridView>
		            </td>
	            </tr>
	            <tr>
		            <td>   
		                <table width="100%">
		                    <tr>
		                        <td class="pagebar">
                                    <asp:Button ID="Button_Pager_First" runat="server" Text="" ToolTip="首页" 
                                        CssClass="pageturn-first-b" onclick="Pager_Click" CommandName="--" />
                                    <asp:Button ID="Button_Pager_Prev" runat="server" Text="" ToolTip="上一页" 
                                        CssClass="pageturn-prev-b" onclick="Pager_Click" CommandName="-" />
                                    <input type="button" class="page-split" />第<asp:TextBox ID="TextBox_Pager" runat="server" CssClass="pageturn" 
                                        ontextchanged="Pager_Click"></asp:TextBox>页<input type="button" class="page-split" /><asp:Label ID="Label_Pages" runat="server"></asp:Label><input type="button" class="page-split" />
                                    
                                    <asp:Button ID="Button_Pager_Next" runat="server" Text="" ToolTip="下一页" 
                                        CssClass="pageturn-next-b" onclick="Pager_Click" CommandName="+" />
                                    <asp:Button ID="Button_Pager_Last" runat="server" Text="" ToolTip="末页" 
                                        CssClass="pageturn-last-b" onclick="Pager_Click" CommandName="++" />
                                </td>
                                <td align="right">
                                    <asp:Label ID="Label_Total" runat="server" CssClass="grid_totalrows"></asp:Label>
                                </td>
                            </tr>
                         </table>
                    </td>
	          </tr>
            </table>

        </div>
    </div>
  </form>
<script>
    var textboxs = document.getElementsByTagName("input");
    var i;
    for (i = 0; i < textboxs.length; i++) {
        if (textboxs[i].className == "textbox") {
            textboxs[i].onchange = function(e) { this.className = "textbox-changed"; };
            textboxs[i].onfocus = function(e) { this.select(); };
        }
        else if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
            textboxs[i].onfocus = function(e) { this.select(); };
        }

    }
    var rows = document.getElementsByTagName("tr");
    for (i = 0; i < rows.length; i++) {

        if (rows[i].className == "grid-row-normal") {
            rows[i].onmouseover = function() { this.className = "grid-row-bright"; };
            rows[i].onmouseout = function() { this.className = "grid-row-normal"; };
            rows[i].onclick = function() { this.firstChild.firstChild.click(); };
        }
    }
    var tds = document.getElementsByTagName("td");
    for (i = 0; i < tds.length; i++) {
        if (tds[i].className == "detailheader") {
            tds[i].innerHTML = tds[i].innerHTML.replace("*", "<span class=required>*</span>");
        }
    }
    var id = "<%=this.SelectedID.Text %>";

    var Button_Edit = document.getElementById("Button_Edit");
    if (Button_Edit) {
        Button_Edit.onclick = function() {
        parent.swin2_load("/Sale/FuLiaoSupplierReAudit.aspx?id=" + id, 720, 980, 'yes')
        };
    }
</script>
</body>
</html>
